from django.urls import path
from ecom.views.ecom.banners import views

app_name = 'banners'

urlpatterns = [
    path('list/', views.BannerListView.as_view(), name='banners-list'),  # 横幅管理
    path('<int:pk>/delete/', views.BannerDeleteView, name='banners-delete'),  # 删除横幅
    path('toggle-status/<int:pk>/', views.toggle_banner_status, name='toggle-banners-status'),  # 横幅状态启用与否
    path('<int:pk>/update-order/', views.update_banner_order, name='update-banners-order'),  # 优先级(未调试)

    path('create/', views.BannerCreateUpdateView.as_view(), name='banner-create'),  # 新建横幅
    path('<int:pk>/update/', views.BannerCreateUpdateView.as_view(), name='banner-update'),  # 更新横幅
    path('<int:pk>/update-product/', views.update_banner_product, name='update-product'),  # 更新横幅关联商品
    # path('upload-image/', views.BannerImageUploadView.as_view(), name='banner-upload-image'),  # 上传横幅图片
    path('upload-image/', views.upload_banner_image, name='upload_banner_image'),  # 上传横幅图片


]
